'use strict';

module.exports = app => {
  const {
    DATE,
    STRING,
    DECIMAL,
  } = app.Sequelize;

  return app.model.define('alipay', {
    trade_no: STRING(65),
    out_trade_no: {
      type: STRING(65),
      primaryKey: true,
    },
    buyer_id: STRING(17),
    trade_status: STRING(33),
    total_amount: DECIMAL(10, 2),
    created_at: DATE,
    updated_at: DATE,
  });
};
